
package entity;

import org.springframework.batch.item.ItemProcessor;

/**
 *
 * @author wangbh
 */
public class MessagesItemProcessor implements ItemProcessor<User, Message> {

    public Message process(User user) throws Exception {
        Message m = new Message();
        m.setContent("Hello " + user.getName() + ", please pay" );
        if("jack".equals(user.getName())) {
            return null;
        }
        return m;
    }

}
